package com.md02.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data //相当于set get toString
@AllArgsConstructor //全参
@NoArgsConstructor  //无参
public class User {

    private String qqNum;
    private String signe; //个性签名
    private List<User> userList;//多个人聊天 user2 user3 user4

    public void chat() {
        String str = ",";
        for (User user : userList) {
            str += user.getQqNum() + ",";

        }

        System.out.println(this.qqNum + "正在跟" + str + "聊天");


    }

}
